/**
*  @file       timer.h
*  @brief      定时器配置库
*  @author     Z B T
*  @version	   LTE
*  @date       2015-10
*/

#ifndef	__TIMER_H
#define	__TIMER_H

#include "config.h"

enum TIMER_N
{
	timer_0, timer_1, 
};

enum TIMER_MODE
{
	timer_13Bit, timer_16Bit,
	timer_8BitAutoReload, timer_8Bit,
};

struct TIMER_INIT_CONFIG
{
    enum TIMER_N      timer_n;              /**< 选择要初始化的定时器 */
	enum TIMER_MODE   timerMode;			/**< 工作模式 */
	uint_8     		  timerInterrupt;		/**< 中断允许配置 */
	uint_8     		  timerInitValue;		/**< 装入定时初值 */
	uint_8     		  timerRun;				/**< 定时器运行配置 */
};

/** 定时器初始化 */
uint_8   timer_inilize(enum TIMER_N timer_n, struct TIMER_INIT_CONFIG timer_x);


#endif